import request from '../utils/request.js';



// 获取token
export const getWechatLogin = (code) => {
	return request({
		url: `/wechatLogin?code=${code}`,
		method: 'get',
	})
}

//获取当前的用户信息

export const getUser = () => {
	return request({
		url: `/web/miniword/info`,
		method: 'get',
	})
}



//注册获取所有的学校

export const getSchool = () => {
	return request({
		url: `/selectDeptList`,
		method: 'get',
	})
}


//获取当前用户的最大关数

export const getHistory = (data) => {
	return request({
		url: `/web/miniword/history`,
		method: 'post',
		data
	})
}
// 

//注册接口---也是修改个人信息接口


export const postUser = (data) => {
	return request({
		url: `/wechatRegister`,
		method: 'post',
		data,
	})

}


export const addUserDuration = (params) => {
	return request({
		url: `/web/userview/addUserDuration?timeStamp=${params.timeStamp}`,
		method: 'get',

	})
}

//获取用户时长
export const getUserDuration = () => {
	return request({
		url: `/web/userview/getUserDuration`,
		method: 'get',

	})
}